//ask.js
const app = getApp()

Page({
  data: {
    codeSrc:'',
  },

  onLoad: function () {
    var that = this
    wx.request({
      url: app.globalData.API_URL + 'home/getGroupCode',
      header: {
        'content-type': 'application/x-www-form-urlencoded'
      },
      method: 'post',
      success: function (r) {
        if(r.data.code == 0){
          that.setData({
            codeSrc: r.data.data.src
          })
        }else{
          wx.showToast({
            title: '微信群已满，请添加上方客服微信。'
          })
        }
      }
    });
  },
})